<?php
@$con = mysql_connect("localhost", "root", "");
if (!$con) {
    die("无法连接数据库:" . mysql_error());
}

mysql_query("set names utf8");
mysql_select_db('bbs');

if ($_POST) {
    $title = $_POST['title'];
    $content = $_POST['content'];
    mysql_query("insert into `article` (`title`, `content`) values ('$title', '$content'')");
}


require "templates/add.html";